﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using SonCa.SocialNetwork.Web.ASCX.IPresenters;
using Core.Common;
using Core.DataAccess;
using System.ComponentModel.Composition;
using Core.BusinessLogic.Interfaces;
using Core.Interfaces;

namespace SonCa.SocialNetwork.Web.ASCX.Presenters
{
    public class AllProfileDisplayPresenter
    {
        private IAllProfileDisplay _view;
        [Import]
        private IUserSession _userSession;
        [Import]
        private IFriendInvitationService _friendInvitationService;
        [Import]
        private IFriendService _friendService;

        public void Init(IAllProfileDisplay view)
        {
            _view = view;
            MEFManager.Compose(this);
        }

        public List<FriendsInvitation> GetListFriendsRequestByAccountID()
        {
            return _friendInvitationService.GetListFriendsRequestByAccountID(_userSession.CurrentUser.AccountID);
        }

        public List<Friend> GetListFriendsByAccountID()
        {
            return _friendService.GetFriendsByAccountID(_userSession.CurrentUser.AccountID);
        }
    }
}